﻿namespace Framework
{
    using System;
    using System.Collections.Generic;

    using System.Linq;
    public interface IDatabase : IDisposable
    {
        IQueryable<TEntity> GetQueryable<TEntity>() where TEntity : class;
        IEnumerable<T> ExecuteQuery<T>(string query, params object[] parameters);
        
        void Insert<TEntity>(TEntity instance) where TEntity : class;

        void Insert<TEntity>(IEnumerable<TEntity> instances) where TEntity : class;

        void Delete<TEntity>(TEntity instance) where TEntity : class;

        void Delete<TEntity>(IEnumerable<TEntity> instances) where TEntity : class;

        void SubmitChanges();


    }
}